<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
    <link rel="stylesheet" href="/index.css"/>
    <script src="/js/vue.js"></script>
    <script src="/index.js"></script>
    <script src="/js/axios.min.js"></script>
</head>
<body>
<div id="app">
    <div class="container">
        <el-form  label-width="150px" >
            <el-form-item label="企业状态">
                <el-input   v-model="company.company_state"></el-input>
            </el-form-item>
        </el-form>


    </div>
</div>

</body>
</html>
<script>
    var vm=new Vue({
        el: "#app",
        data: {
            company:{
            },
        },
        methods: {
            updatePass:function (){
                var company_id = window.localStorage.getItem("company_id")
                var company_pass = window.localStorage.getItem("company_pass")
                console.log(this.company)
                axios.post('/company/update3', this.company)
                    .then(function (response) {
                        console.log(response.data);
                        if(response.data==1){
                            alert("修改成功！")
                            location.href="12.html"
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });

            },
        },
        mounted() {
            var _this = this
            var company_id = window.localStorage.getItem("company_id")
            console.log("主键为："+ company_id)
            axios.get('/company/update3',{
                params:{
                    company_id: company_id
                }
            })
                .then(function (response){
                    _this.company = response.data
                    console.log(response.data);
                })
                .catch(function (error){
                    console.log(error);
                });
            //this.$forceUpdate()

        },
    })

</script>

<style>
    .container{
        position: absolute;
        top: 40%;
        left: 50%;
        -webkit-transform: translate(-50%, -50%);
        -moz-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
        -o-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
    }
    .el-input {
        width: 230px;
    }
    .el-input-group__prepend {
        background-color: #fff;
    }

    body > .el-container {
        margin-bottom: 40px;
    }

    .el-container:nth-child(5) .el-aside,
    .el-container:nth-child(6) .el-aside {
        line-height: 260px;
    }

    .el-container:nth-child(7) .el-aside {
        line-height: 320px;
    }

    .linkage {display: flex;}

    div { margin-right: 5px }
</style>